package com.zxh.zhenxihuan.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author:geQiang
 * @version:1.0
 * @date:2019/7/24
 * @description:com.zxh.zhenxihuan.controller
 */
@RestController
@CrossOrigin
@RequestMapping("/users")
public class UserController {
//    @Resource
//    private UserService userService;
    @PostMapping("/login")
    public String login(
            @RequestParam(value = "name", defaultValue = "", required = false) String name,
            @RequestParam(value = "password", defaultValue = "", required = false) String password
    ){
        return null;
//        Map<String,Object> map = userService.login(name, password);
//        System.out.println(map);
//        return JSON.toJSONStringWithDateFormat(map,"yyyy-MM-dd HH:mm:ss", SerializerFeature.DisableCircularReferenceDetect);
    }
}
